
package cn.zlg.common.springmvc.validate.constraints;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.validation.Constraint;
import javax.validation.Payload;

import cn.zlg.common.springmvc.validate.constraintsvalidator.NotNullValidator;

@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR,
        ElementType.PARAMETER })
@Constraint(validatedBy = { NotNullValidator.class })
@Retention(RetentionPolicy.RUNTIME)
public @interface NotNull {

    String field() default "";

    String message() default "{field.can.not.be.null}";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
